home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / man / cmds.fmt / tcl.man < prev    next >
Encoding:
Text File  |  1991-12-05  |  25.8 KB  |  595 lines

  1.  
  2.  
  3.  
  4. TCLSHELL             UNKNOWN MANUAL SECTION              TCLSHELL
  5.  
  6.  
  7.  
  8. NNAAMMEE
  9.      Tcl - Tcl interactive shell.
  10.  
  11. SSYYNNOOPPSSIISS
  12.      ttccll [[--qq]] [[[[--ff]] _s_c_r_i_p_t]]||[[--cc _c_o_m_m_a_n_d]] [[_a_r_g_s]
  13.  
  14.  
  15. DDEESSCCRRIIPPTTIIOONN
  16.      ttccll [[--qq]] [[[[--ff]] _s_c_r_i_p_t]]||[[--cc _c_o_m_m_a_n_d]] [[_a_r_g_s]
  17.  
  18.      TTccll starts the interactive Tcl command interpreter.  The Tcl
  19.      shell  provides  an  environment  for writing, debugging and
  20.      executing Tcl scripts.  The functionality of the  Tcl  shell
  21.      can also be obtained in any Tcl-based application.
  22.  
  23.      The ttccll command, issued without any  arguments,  invokes  an
  24.      interactive  Tcl  shell.   If  _s_c_r_i_p_t is specified, then the
  25.      script is executed noninteractively with _a_r_g_s being supplied
  26.      in  the  Tcl  variable `aarrggvv'.  If _c_o_m_m_a_n_d is supplied, then
  27.      this command (or series of commands, separated  by  `;')  is
  28.      executed, with `aarrggvv' containing _a_r_g_s.
  29.  
  30.      The Tcl shell is intended as an environment for Tcl  program
  31.      development  and execution.  While it is not a full-featured
  32.      interactive shell, it provides a comfortable environment for
  33.      the  interactive  development  of  Tcl  code.  Note that the
  34.      package library code described here  overrides  the  uunnkknnoowwnn
  35.      command  provided  as  part  of  the  standard  Berkeley Tcl
  36.      library facility, although Tcl  source  libraries  coded  to
  37.      that standard can be loaded and used by Extended Tcl.
  38.  
  39. IINNIITTIIAALLIIZZAATTIIOONN SSEEQQUUEENNCCEE
  40.      The standard Tcl shell initialization consists of  the  fol-
  41.      lowing steps:
  42.  
  43.           Search for a default file.  The default file is  a  Tcl
  44.           script  that is executed to set important Tcl variables
  45.           that govern startup, such as TTCCLLPPAATTHH.  The Tcl  default
  46.           file  is  searched  for  using the following algorithm:
  47.           The current Extended Tcl version, represented by  $ver,
  48.           is  included in the default file naming to allow multi-
  49.           ple Tcl versions to exists on a system.  Note that  the
  50.           Extended Tcl version is the standard Tcl version number
  51.           with an alphabetic character  added  to  indicated  the
  52.           version  of  Extended  Tcl.   The iinnffooxx vveerrssiioonn command
  53.           will return this version number.
  54.  
  55.                - An environment variable, TTCCLLDDEEFFAAUULLTT, is  checked
  56.                for.   If  present,  it is used as the name of the
  57.                default file.
  58.  
  59.                - A file, TTCCLLDDEEFFAAUULLTT, is looked for in the current
  60.  
  61.  
  62.  
  63. Tcl                                                             1
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. TCLSHELL             UNKNOWN MANUAL SECTION              TCLSHELL
  71.  
  72.  
  73.  
  74.                directory.
  75.  
  76.                - A global default file  with  is  usually  either
  77.                //eettcc//ddeeffaauulltt//ttccll$$vveerr                            or
  78.                //uussrr//llooccaall//lliibb//ttccllddeeffaauulltt$$vveerr.  (Tcl may  be  com-
  79.                piled  to  use  a different directory on some sys-
  80.                tems).
  81.  
  82.           First, TTccll executes the default file.  This  file  nor-
  83.           mally  sets  at least two Tcl variables: TTCCLLPPAATTHH, which
  84.           contains a list of directories that contain tcl  source
  85.           files, and TTCCLLIINNIITT, the full pathname of the Tcl source
  86.           file that performs  Tcl  initialization.   Other  site-
  87.           specific variables may also be set in this file.
  88.  
  89.           Next, ttccll executes the initialization file specified by
  90.           the   Tcl  variable  TTCCLLIINNIITT.   This  is  normally  the
  91.           TTccllIInniitt..TTccll  file  distributed  with  Tcl.   This  file
  92.           defines  the  Tcl  environment,  including standard Tcl
  93.           procs and variables.
  94.  
  95. FFLLAAGGSS
  96.      --qq   Quick initialization flag.  If this  flag  is  set  the
  97.           only initialization step performed is to locate the Tcl
  98.           default file and save its  name  in  the  Tcl  variable
  99.           TCLDEFAULT.   The  file  is  not  evaluated  nor is the
  100.           TclInit.tcl file.  This provides for a faster start up,
  101.           but  does  not  make any of the standard Tcl procedures
  102.           and facilities available.
  103.  
  104.      --ff   Take the next argument as a Tcl script to source rather
  105.           than  enter interactive mode.  The --ff flag is optional.
  106.           Normally the first argument that does not start with  a
  107.           `-'  is  taken as the script to execute unless the `-c'
  108.           option  is  specified.   All  following  arguments  are
  109.           passed  to the script in aarrggvv, thus any other Tcl shell
  110.           flags must precede this option.
  111.  
  112.      --cc   Take the next argument as a Tcl command to execute.  It
  113.           may be series of commands to execute, separated by `;'.
  114.           All following arguments are passed in  aarrggvv,  thus  any
  115.           other Tcl shell flags must precede this option.
  116.  
  117.      ----   Mark the end of the arguments to  the  Tcl  shell.  All
  118.           arguments following this are passed in the Tcl variable
  119.           aarrggvv.   This  is  useful  to  pass  arguments   without
  120.           attempting to execute a Tcl script.
  121.  
  122. TTCCLLIINNIITT FFIILLEE
  123.      The Tcl initialization file,  normally  _T_c_l_I_n_i_t._t_c_l  in  the
  124.      main  Tcl  script  directory, initializes the Tcl shell.  It
  125.      defines  various  Tcl  procedures  that  are   required   to
  126.  
  127.  
  128.  
  129. Tcl                                                             2
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. TCLSHELL             UNKNOWN MANUAL SECTION              TCLSHELL
  137.  
  138.  
  139.  
  140.      implement loading of Tcl source from libraries via the pack-
  141.      age libraries and autoload facilities.
  142.  
  143.      If the Tcl is invoked interactively, it will source a ._t_c_l_r_c
  144.      in  the  user's home directory, if it exists.  Tcl is viewed
  145.      primarly as  a  programming  language,  not  an  interactive
  146.      shell,  so  the  ._t_c_l_r_c  is  intended  for  use  for loading
  147.      development utilities, not to support programs, which should
  148.      not rely on the user's environment.
  149.  
  150. VVAARRIIAABBLLEESS
  151.      The following variables are  set  and/or  used  by  the  Tcl
  152.      shell.
  153.  
  154.      aarrggvv A list containing the arguments passed in from the com-
  155.           mand  line,  excluding arguments used by the Tcl shell.
  156.           The first element is the first passed argument, not the
  157.           program name.
  158.  
  159.      iinntteerraaccttiivveeSSeessssiioonn
  160.           Set to 11 if Tcl shell is invoked interactively, or 00 if
  161.           the Tcl shell is directly executing a script.
  162.  
  163.      nnooAAuuttooEExxeecc
  164.           If this variable exists and has a value of 11, then  the
  165.           Tcl shell will not attempt to exec an non-existent com-
  166.           mand as a shell command.
  167.  
  168.      pprrooggrraammNNaammee
  169.           The name that the  Tcl  shell  is  executing  as.   All
  170.           directory components are removed from the program name.
  171.  
  172.      ssccrriippttNNaammee
  173.           The name of the script that the Tcl shell is  executing
  174.           if the script was invoked on the command line.
  175.  
  176.      TTCCLLDDEEFFAAUULLTT
  177.           Name of the default file that was used  to  locate  all
  178.           other files used by the Tcl shell.
  179.  
  180.      TTCCLLEENNVV
  181.           Array that  contains  information  used  internally  by
  182.           various Tcl procedures that are part of the Tcl shell.
  183.  
  184.      TTCCLLEENNVV((ttooppLLeevveellPPrroommppttHHooookk))
  185.           Contains code to run to generate the prompt  used  when
  186.           interactively prompting for commands.  The code in this
  187.           hook will be evaluated and the result will be used  for
  188.           the prompt.
  189.  
  190.      TTCCLLEENNVV((ddoowwnnLLeevveellPPrroommppttHHooookk))
  191.           Contains code to run to generate the prompt  used  when
  192.  
  193.  
  194.  
  195. Tcl                                                             3
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. TCLSHELL             UNKNOWN MANUAL SECTION              TCLSHELL
  203.  
  204.  
  205.  
  206.           interactively  prompting  for continuation of an incom-
  207.           plete command.  The code in this hook will be evaluated
  208.           and the result will be used for the prompt
  209.  
  210.      TTCCLLIINNIITT
  211.           The name of the file that initializes, and does startup
  212.           processing of, Tcl.
  213.  
  214.      TTCCLLPPAATTHH
  215.           Path to search to locate Tcl scripts.  Used by the llooaadd
  216.           and ddeemmaanndd__llooaadd procedures.
  217.  
  218. HHEELLPP FFAACCIILLIITTYY
  219.      The help facility allows for display of help files extracted
  220.      from  the  standard  Tcl manual pages and Tcl scripts.  Help
  221.      files are structured in a multilevel directory tree of  sub-
  222.      jects  and  help  files.  The following commands and options
  223.      are provided with the help package:
  224.  
  225.      hheellpp
  226.           Help, without arguments, lists  of  all  the  top-level
  227.           help subject directories and files.
  228.  
  229.      hheellpp _s_u_b_j_e_c_t_d_i_r
  230.           Displays all of help  files  and  lower  level  subject
  231.           files (if any exist) under the directory _s_u_b_j_e_c_t_d_i_r.
  232.  
  233.      hheellpp _s_u_b_j_e_c_t_d_i_r/_h_e_l_p_f_i_l_e
  234.           Display the specified help file.  The  help  output  is
  235.           passed  through  a  simple  pager  if output exceeds 23
  236.           lines, pausing waiting for a return to be entered.   If
  237.           any  other  character  is  entered,  the output is ter-
  238.           minated.
  239.  
  240.      hheellppccdd [[_s_u_b_j_e_c_t_d_i_r]
  241.           Change the current subject  directory,  which  is  much
  242.           like the Unix current directory.  This directory can be
  243.           changed with the hheellppccdd command.  If _s_u_b_j_e_c_t_d_i_r is  not
  244.           specified,  return  to  the top-level of the help tree.
  245.           Help path names may also include ``..'' elements.
  246.  
  247.      hheellppppwwdd
  248.           Displays the current help subject directory.
  249.  
  250.      hheellpp hheellpp || ??
  251.           Displays help on the help  facility  at  any  directory
  252.           level.
  253.  
  254.      aapprrooppooss _p_a_t_t_e_r_n
  255.           This command locates subjects by searching  their  one-
  256.           line  descriptions  for  a  pattern.  Apropos is useful
  257.           when you can remember part of the name  or  description
  258.  
  259.  
  260.  
  261. Tcl                                                             4
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. TCLSHELL             UNKNOWN MANUAL SECTION              TCLSHELL
  269.  
  270.  
  271.  
  272.           of  a  command, and want to search through the one-line
  273.           summaries for matching lines.  Full regular expressions
  274.           may be specified (see the rreeggeexxpp command).
  275.  
  276. CCOOMMMMAANNDD RREESSUULLTTSS
  277.      The string result of a command typed at the Tcl  shell  com-
  278.      mand  prompt  is  normally  echoed  back to the user.  If an
  279.      error occurs, then the string  result  is  displayed,  along
  280.      with  the error message.  The error message will be preceded
  281.      by the string ``Error:''.
  282.  
  283.      The sseett command is a special case.  If the command is called
  284.      to set a variable (i.e. with two arguments), then the result
  285.      will not be echoed.  If only one argument,  the  name  of  a
  286.      variable,  is  supplied  to  sseett,  then  the  result will be
  287.      echoed.
  288.  
  289. EEXXEECCUUTTIIOONN OOFF UUNNIIXX CCOOMMMMAANNDDSS
  290.      If an unknown Tcl command is entered from the command  line,
  291.      then  the  Unix  command  path, specified in the environment
  292.      variable PPAATTHH, will be searched for a command  of  the  same
  293.      name.  If found, the command will be executed.  This feature
  294.      is provided  to  enhance  the  interactive  environment  for
  295.      developing Tcl scripts. This is only supported from the com-
  296.      mand line, not in script files or in  procedures,  to  elim-
  297.      inate  confusion.  The eexxeecc or ssyysstteemm command should be used
  298.      to run Unix commands inside scripts.
  299.  
  300. TTCCLL SSHHEELLLL PPRROOCCEEDDUURREESS
  301.      The follow additional procedures  are  defined  by  the  Tcl
  302.      shell and may be generally useful:
  303.  
  304.      llooaadd _f_i_l_e
  305.           Source a file,  as  with  the  source  command,  except
  306.           search the TCLPATH for the file.
  307.  
  308.      sseeaarrcchhppaatthh _p_a_t_h _f_i_l_e
  309.           Search all directories in the specified path, which  is
  310.           a  Tcl  list, for the specified file.  Returns the full
  311.           path name of the file, or an empty string if  the  file
  312.           is not found.
  313.  
  314. AAUUTTOOLLOOAADD
  315.      aauuttoollooaadd _f_i_l_e _p_r_o_c_1 [.._p_r_o_c_N]
  316.  
  317.      The _a_u_t_o_l_o_a_d procedure, defined in TTccllIInniitt..ttccll,  allows  the
  318.      Tcl  programmer  to name one or more procedures and the file
  319.      they are defined in.  After _a_u_t_o_l_o_a_d has  been  executed  to
  320.      inform  Tcl of the presence of them, a subsequent attempt to
  321.      execute one of the procedures will cause  the  corresponding
  322.      file to be loaded transparently prior to executing the func-
  323.      tion.  For example, executing:
  324.  
  325.  
  326.  
  327. Tcl                                                             5
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334. TCLSHELL             UNKNOWN MANUAL SECTION              TCLSHELL
  335.  
  336.  
  337.  
  338.           autoload showproc.tcl showproc showprocs
  339.  
  340.      tells Tcl to automatically load the  file  sshhoowwpprroocc..ttccll  the
  341.      first  time  in  the current session that either _s_h_o_w_p_r_o_c or
  342.      _s_h_o_w_p_r_o_c_s is executed.
  343.  
  344. PPAACCKKAAGGEE LLIIBBRRAARRIIEESS
  345.      Package libraries work like _a_u_t_o_l_o_a_d, except that a  package
  346.      library  file can contain multiple independent Tcl packages.
  347.      A package is a collection of related Tcl procedures.
  348.  
  349.      The package library file is just a regular Unix  text  file,
  350.      editable with your favorite text editor, containing packages
  351.      of Tcl source code. The package library must end  in  ..ttlliibb,
  352.      an   index   file  with  the  suffix  ..ttnnddxx  will  be  built
  353.      corresponding to the package library.  The start of a  pack-
  354.      age is delimited by:
  355.  
  356.           ##@@ppaacckkaaggee:: _p_a_c_k_a_g_e__n_a_m_e _p_r_o_c_1 [.._p_r_o_c_N]
  357.  
  358.      These lines must start in column  one.   Everything  between
  359.      the ppaacckkaaggee keyword and the next ppaacckkaaggee keyword, or the end
  360.      of the file, becomes part of the named package.  The  speci-
  361.      fied  procedures,  _p_r_o_c_1.._p_r_o_c_N, are the entry points of the
  362.      package.  When a command named in a package command is  exe-
  363.      cuted  and  detected  as an unknown command, all code in the
  364.      specified package will  be  sourced.   This  package  should
  365.      define  all  of  the  procedures  named on the package line,
  366.      define any support procedures required by the package and do
  367.      any package-specific initialization.
  368.  
  369.      For example, in a package source file, the presence  of  the
  370.      following line:
  371.  
  372.           ##@@ppaacckkaaggee:: ddiirreeccttoorryy__ssttaacckk ppuusshhdd ppooppdd ddiirrss
  373.  
  374.      says that the text lines following that line in the  package
  375.      file up to the next _p_a_c_k_a_g_e line or the end of the file is a
  376.      package named ddiirreeccttoorryy__ssttaacckk and that an attempt to execute
  377.      either  _p_u_s_h_d,  _p_o_p_d or _d_i_r_s when the routine is not already
  378.      defined will cause the ddiirreeccttoorryy__ssttaacckk portion of the  pack-
  379.      age file to be loaded.
  380.  
  381. PPAACCKKAAGGEE IINNDDEEXX FFIILLEESS
  382.      A package library file has associated with it an index  file
  383.      called  a  ..ttnnddxx file.  The ..ttnnddxx file contains the names of
  384.      the packages in the ..ttlliibb file, their addresses and  lengths
  385.      within  the  ..ttlliibb  file and the functions that are to cause
  386.      the different packages to be autoloaded when an  attempt  is
  387.      made to execute them.
  388.  
  389.      The first time Tcl tries to execute a  procedure  where  the
  390.  
  391.  
  392.  
  393. Tcl                                                             6
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400. TCLSHELL             UNKNOWN MANUAL SECTION              TCLSHELL
  401.  
  402.  
  403.  
  404.      procedure  doesn't  exist  and  isn't  an autoload, Tcl will
  405.      search along TTCCLLPPAATTHH looking for any files ending in  ..ttlliibb.
  406.      For  each  one  it  finds,  it  checks  to see if there is a
  407.      corresponding file in the same directory  ending  in  ..ttnnddxx.
  408.      If  the  ..ttnnddxx  file  doesn't  exist, or if its date of last
  409.      modification is older than that of the ..ttlliibb file, the ..ttnnddxx
  410.      is  automatically  (re)generated  if possible.  If Tcl can't
  411.      regenerate the file (most likely due to  file  or  directory
  412.      permission problems), an error occurs.
  413.  
  414.      Demand loading is also supported from indexes build  by  the
  415.      mmkkiinnddeexx..ttccll  program,  supplied with standard Tcl.  However,
  416.      iinniitt..ttccll is not loaded.  Note that the iinnffoo lliibbrraarryy  command
  417.      is  not  used to locate libraries by this shell; the TTCCLLPPAATTHH
  418.      variable is set by the default file and is  used  to  locate
  419.      the libraries.
  420.  
  421. PPAACCKKAAGGEE MMAANNAAGGEEMMEENNTT CCOOMMMMAANNDDSS
  422.      Several commands are available  for  building  and  managing
  423.      package   libraries.    If  you  are  not  building  package
  424.      libraries and are  using  the  standard  Tcl  initialization
  425.      file,  they  are all transparent.  These commands are either
  426.      defined or autoloaded by TTccllIInniitt..ttccll.
  427.  
  428.      aauuttoopprrooccss
  429.           Lists the names  of  all  known  autoload  and  package
  430.           library procedures.
  431.  
  432.      bbuuiillddppaacckkaaggeeiinnddeexx _l_i_b_f_i_l_e
  433.           Build an index for a package library.  The the  _l_i_b_f_i_l_e
  434.           name must end with the suffix ..ttlliibb.
  435.  
  436.      ddeemmaanndd__llooaadd _p_r_o_c_n_a_m_e
  437.           Attempt to load the specified procedure, either  as  an
  438.           autoload  function or by loading the package containing
  439.           the procedure.  If the package indexes  have  not  been
  440.           loaded  for all package libraries in TTCCLLPPAATTHH, they will
  441.           be loaded.  Out-of-date library indexes will be rebuilt
  442.           if  they  are writable.  The procedure returns 11 if the
  443.           procedure was sucessfully loaded, or 00 if it was not.
  444.  
  445.      llooaaddlliibbiinnddeexx _l_i_b_f_i_l_e
  446.           Load the package library index of the library file lliibb--
  447.           ffiillee  (which  must  have  the  suffix  ._t_l_i_b).  Package
  448.           library indexes along the TTCCLLPPAATTHH are loaded  automati-
  449.           cally  on  the  first demand_load; this command is pro-
  450.           vided to explicitly load libraries that are not in  the
  451.           path.  If the index file (with a ._t_n_d_x suffix) does not
  452.           exists or is out of date, it will  be  rebuilt  if  the
  453.           user has directory permissions to create it.
  454.  
  455.      ppaacckkaaggeess
  456.  
  457.  
  458.  
  459. Tcl                                                             7
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466. TCLSHELL             UNKNOWN MANUAL SECTION              TCLSHELL
  467.  
  468.  
  469.  
  470.           Returns a list of the names of all known packages.
  471.  
  472.      This section discusses the internal structure of  the  stan-
  473.      dard  Tcl  initialization  file and the facilities it imple-
  474.      ments.  This is intended primarily for developers  who  want
  475.      to customize these facilities for their applications.
  476.  
  477.      AAuuttoollooaadd aanndd PPaacckkaaggee LLiibbrraarryy SSttrruuccttuurreess
  478.  
  479.      The package library index consists  of  an  entry  for  each
  480.      package  in  the  library, where each entry is a call to the
  481.      TTCCLLSSHH::ddeeffppkkgg procedure.  Loading of  the  package  index  is
  482.      done  with  the ssoouurrccee command.  The _d_e_f_p_a_c_k_a_g_e routine ini-
  483.      tializes elements of the TTCCLLEENNVV  array  which  are  used  by
  484.      ddeemmaanndd__llooaadd  to  locate  and load a package.  The bbuuiillddppaacckk--
  485.      aaggeeiinnddeexx procedure is contained in ppaacckkaaggeess..ttccll.
  486.  
  487.      The following elements of the TTCCLLEENNVV are used  to  implement
  488.      the autoload and package library facility.
  489.  
  490.      TTCCLLEENNVV((PPRROOCC::_p_r_o_c_N_a_m_e))
  491.           Each procedure that is to be loaded by the  ddeemmaanndd__llooaadd
  492.           command has an entry in this array, indexed by the con-
  493.           catenation of `PROC:' with the procedure name.  If  the
  494.           entry  is  for  a  package, it is a list consisting `P'
  495.           followed by the name of the package.  The package  name
  496.           must  be  looked  up  in  the  TCLENV array to find the
  497.           actual library file.  If the entry is for  an  autoload
  498.           procedure,  it  is a list consisting of 'F' followed by
  499.           the name of the file to load.
  500.  
  501.      TTCCLLEENNVV((PPKKGG::_p_a_c_k_a_g_e_N_a_m_e))
  502.           Each package has an entry in the array indexed  by  the
  503.           concatenation  of  `PKG:'  and the name of the package.
  504.           The entry is a list containing the  full  path  to  the
  505.           library  file, the byte offset in the file of the start
  506.           of the package, and the length of the package.
  507.  
  508.      TTCCLLEENNVV((ppaacckkaaggeeIInnddeexxeessLLooaaddeedd))
  509.           A boolean that indicates if the  package  indexes  have
  510.           been  loaded.   They will not be loaded until the first
  511.           call to ddeemmaanndd__llooaadd.
  512.  
  513.      TTCCLLEENNVV((iinnUUnnkknnoowwnn))
  514.           Indicates if the uunnkknnoowwnn  command  is  currently  being
  515.           executed.  It is used to detect recursion in situations
  516.           where an unknown command is found during  unknown  com-
  517.           mand processing.
  518.  
  519.      The following procedures are used to implement the internals
  520.      of  the  autoload  and  package  library  facility,  and are
  521.      defined by TTccllIInniitt..ttccll:
  522.  
  523.  
  524.  
  525. Tcl                                                             8
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532. TCLSHELL             UNKNOWN MANUAL SECTION              TCLSHELL
  533.  
  534.  
  535.  
  536.      TTCCLLSSHH::ddeeffppkkgg _p_k_g_n_a_m_e _l_i_b_f_i_l_e _o_f_f_s_e_t _l_e_n _p_r_o_c_1 [.._p_r_o_c_N]
  537.           Define a package for the current interpreter.   _P_k_g_n_a_m_e
  538.           is  the  name  of the package to define, _l_i_b_f_i_l_e is the
  539.           full path to the library  file.   _o_f_f_s_e_t  is  the  byte
  540.           offset  into  the of the start of the package code; _l_e_n
  541.           is the length  of  the  package  code,  in  bytes,  and
  542.           _p_r_o_c_1.._p_r_o_c_N  are the entry point procedures defined by
  543.           the package.  This procedure  is  normally  not  called
  544.           directly by the user or the user's script.  The library
  545.           index files consists of  calls  to  this  procedure  to
  546.           define every package in a library.
  547.  
  548.      TTCCLLSSHH::LLooaaddOOuusstteerrIInnddeexx ddiirr
  549.           Load an index file, _d_i_r/ttccllIInnddeexx, of the type built  by
  550.           John  Ousterhout's  mmkkiinnddeexx..ttccll  program (included with
  551.           the standard Tcl distribution).  This  style  of  index
  552.           defines  procedure  names  and  the  files that contain
  553.           them.  It is  a  one-index-to-many-source-files  struc-
  554.           ture.  All  of the files pointed to by this must reside
  555.           in _d_i_r.  The procedures  in  these  libraries  will  be
  556.           defined as if the autoload command had been used.
  557.  
  558.      TTCCLLSSHH::LLooaaddPPaacckkaaggeeIInnddeexxeess
  559.           This procedure searches the path defined by  Tcl  vari-
  560.           able  TTCCLLPPAATTHH  and  loads all of the indexes for all of
  561.           the ._t_l_i_b package libraries in the path.  If any of the
  562.           indexes are older that their corresponding library file
  563.           or do not exist, then they will be rebuilt if the  user
  564.           has   write   access   to   the  directory.   Also  all
  565.           Ousterhout-style indexes found along the path  will  be
  566.           loaded.
  567.  
  568.      uunnkknnoowwnn
  569.           This is the actual unknown command  trap  handler.   It
  570.           will  first  do a ddeemmaanndd__llooaadd, loading the uunnkknnoowwnn com-
  571.           mand if it has been defined by aauuttoollooaadd, or by a  pack-
  572.           age  library  index.   The  library  indexes will be be
  573.           loaded if this is the first call to  uunnkknnoowwnn.   If  the
  574.           command  is not found by ddeemmaanndd__llooaadd, the Unix path (in
  575.           the environment variable PPAATTHH, will be searched for the
  576.           command.   If  it is found, it will be executed via the
  577.           ssyysstteemm command, providing full shell (sshh) command  line
  578.           expansion,  with  output  going  to standard out rather
  579.           than being returned as the result of the command.  This
  580.           binary  path  search  will  only  occur  if  this is an
  581.           interactive session running at the top level (i.e., not
  582.           in  a procedure or a script). This behavior can be dis-
  583.           abled with the nnooAAuuttooEExxeecc variable.
  584.  
  585.  
  586.  
  587.  
  588.  
  589.  
  590.  
  591. Tcl                                                             9
  592.  
  593.  
  594.  
  595.